﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using PMKB_DAL;

namespace PMKB_Repository
{
    class Permission
    {
        public string ConnectionName;
        public bool HasRightToDeleteLink(long id, string User)
        {
            using (var lt = new Link_OLAP_List(ConnectionName))
            {
                var arr =lt.LoadFromDB.LoadFrom_LinkIDQ(id).Select(item => item.UserName);
                return (arr.Contains(User));

            }
        }
    }
}
